home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIPrompt.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  132 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. /**
  39.  * @status UNDER_REVIEW
  40.  */
  41.  
  42. /**
  43.  * This is the prompt interface which can be used without knowlege of a
  44.  * parent window. The parentage is hidden by the GetInterface though
  45.  * which it is gotten. This interface is identical to nsIPromptService
  46.  * but without the parent nsIDOMWindow parameter. See nsIPromptService
  47.  * for all documentation.
  48.  *
  49.  * Accesskeys can be attached to buttons and checkboxes by inserting
  50.  * an & before the accesskey character. For a real &, use && instead.
  51.  */  
  52.  
  53. #include "nsISupports.idl"
  54.  
  55. [scriptable, uuid(a63f70c0-148b-11d3-9333-00104ba0fd40)]
  56. interface nsIPrompt : nsISupports
  57. {
  58.     void alert(in wstring dialogTitle,
  59.                in wstring text);
  60.  
  61.     void alertCheck(in wstring dialogTitle,
  62.                     in wstring text,
  63.                     in wstring checkMsg,
  64.                     inout boolean checkValue);
  65.  
  66.     boolean confirm(in wstring dialogTitle,
  67.                     in wstring text);
  68.  
  69.     boolean confirmCheck(in wstring dialogTitle,
  70.                          in wstring text,
  71.                          in wstring checkMsg,
  72.                          inout boolean checkValue);
  73.                          
  74.     const unsigned long BUTTON_POS_0              = 1;
  75.     const unsigned long BUTTON_POS_1              = 1 << 8;
  76.     const unsigned long BUTTON_POS_2              = 1 << 16;
  77.      
  78.     const unsigned long BUTTON_TITLE_OK            = 1;
  79.     const unsigned long BUTTON_TITLE_CANCEL        = 2;
  80.     const unsigned long BUTTON_TITLE_YES           = 3;
  81.     const unsigned long BUTTON_TITLE_NO            = 4;
  82.     const unsigned long BUTTON_TITLE_SAVE          = 5;
  83.     const unsigned long BUTTON_TITLE_DONT_SAVE     = 6;
  84.     const unsigned long BUTTON_TITLE_REVERT        = 7;
  85.  
  86.     const unsigned long BUTTON_TITLE_IS_STRING     = 127;
  87.     
  88.     const unsigned long BUTTON_POS_0_DEFAULT       = 0 << 24;
  89.     const unsigned long BUTTON_POS_1_DEFAULT       = 1 << 24;
  90.     const unsigned long BUTTON_POS_2_DEFAULT       = 2 << 24;
  91.  
  92.     /* used for security dialogs, buttons are initially disabled */
  93.     const unsigned long BUTTON_DELAY_ENABLE        = 1 << 26;
  94.  
  95.     const unsigned long STD_OK_CANCEL_BUTTONS      = (BUTTON_TITLE_OK * BUTTON_POS_0) +
  96.                                                     (BUTTON_TITLE_CANCEL * BUTTON_POS_1);
  97.  
  98.     PRInt32 confirmEx(in wstring dialogTitle,
  99.                    in wstring text,
  100.                    in unsigned long buttonFlags,
  101.                    in wstring button0Title,
  102.                    in wstring button1Title,
  103.                    in wstring button2Title,
  104.                    in wstring checkMsg,
  105.                    inout boolean checkValue);
  106.  
  107.      boolean prompt(in wstring dialogTitle,
  108.                     in wstring text,
  109.                     inout wstring value, 
  110.                     in wstring checkMsg,
  111.                     inout boolean checkValue);
  112.  
  113.      boolean promptPassword(in wstring dialogTitle,
  114.                             in wstring text,
  115.                             inout wstring password,
  116.                             in wstring checkMsg,
  117.                             inout boolean checkValue);
  118.  
  119.      boolean promptUsernameAndPassword(in wstring dialogTitle,
  120.                                        in wstring text,
  121.                                        inout wstring username,
  122.                                        inout wstring password,
  123.                                        in wstring checkMsg,
  124.                                        inout boolean checkValue);
  125.     
  126.     boolean select(in wstring dialogTitle,
  127.                    in wstring text,
  128.                    in  PRUint32 count,
  129.                    [array, size_is(count)] in wstring selectList,
  130.                    out long outSelection);
  131. };
  132.